package com.itheima.app;

import com.itheima.pojo.Person;
import com.itheima.service.PersonService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DIApp {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext app = new ClassPathXmlApplicationContext("application-DI.xml");
        PersonService personService = (PersonService) app.getBean("personService");
        personService.save();
    }
}
